#!/usr/bin/env python3

import os

# Path to the ffconf.h file
ffconf_path = r'G:\Espressif\frameworks\esp-idf-v5.5.1\components\fatfs\src\ffconf.h'

# Read the file content
with open(ffconf_path, 'r') as f:
    content = f.read()

# Fix the syntax error by removing the single quotes around the define
fixed_content = content.replace("'#define FF_FS_CASESENSITIVE 1'", "#define FF_FS_CASESENSITIVE 1")

# Write the fixed content back to the file
with open(ffconf_path, 'w') as f:
    f.write(fixed_content)

print(f"Fixed ffconf.h file at {ffconf_path}")
print("Removed single quotes around '#define FF_FS_CASESENSITIVE 1'")
